<?php
Class h5 extends Mod
{
	private $hkey = '';
	public $jsdata = '';
	
	/*public function run()
	{
		$this->hkey = isset($_GET['k']) ? Unit::safe($_GET['k']) : 'daily';
		$path = DATA_DIR . $this->hkey . DS;
		$file = $path . 'index.php';
		if (file_exists($file)) {
			include_once $file;
		}
	}*/
	
	public function loadJs()
	{
		$this->load('js');
	}
	
	public function load($dirname)
	{
		$path = DATA_DIR . $this->hkey . DS . $dirname . DS;
		$ary = array();
		if (is_dir($path)) {
			$handle = opendir($path);
			while (false !== ($row = readdir($handle))) {
				if ($row != '.' && $row != '..') {
					$ary[] = $path . $row;
				}
			}
			closedir($handle);
		}
		return $ary;
	}
	
	
}